<?php

    class ValidatorUtility {

        public static function isInteger($value) {
            return filter_var($value, FILTER_VALIDATE_INT) !== false;
        }

        public static function doesFieldExist($field) {
            return ($field != null && $field != '');
        }

    }
<?php

    class ValidatorUtility {

        public static function isInteger($value) {
            return filter_var($value, FILTER_VALIDATE_INT) !== false;
        }

        public static function doesFieldExist($field) {
            if (is_null($field)) {
                return false;
            }

            if (gettype($field) == 'string' && $field === '') {
                return false;
            }

            return true;
        }

    }
Add more nuanced doesFieldExist checks
Add more nuanced doesFieldExist checks

Accounts for fields that, when filled, aren't strings.
