Implements some necessary validations.