fixes for arguments with 'nonnull' attribute passed null