Move this method to a new class named Preconditions in org.mule.util.
Perhaps it makes sense to have a more reusable method like checkArgument(boolean condition, String message) ?