Functions

Functions for parameter checking