Replace t3lib_div::testInt, t3lib_div::intInRange with helper functions