nonnull validation checks if object hasOwnProperty