Check if an entity is a string when validating it against integer, number and boolean

is_numeric(), is_int() and is_bool() are not sufficient when checking the data type of an entity. E.g. "2" is not numerical in javascript but in PHP it is.