Add helper methods similar to checkArgument