$id = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('id');
$username = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('username'); if (empty($username)) { // Display error message }This will check to see if the "username" parameter is empty, and if it is, display an error message to the user. The package library for GeneralUtility is "typo3/cms-core".