Sql Check Empty String Python Functions With Parameters