[TASK] Fix typecasting to comply with TYPO3 CGL