fix passing null for argument with 'nonnull' attribute