The fix typo is wrong as George mentioned. However, the "move one JFactory::getUser(); call" is good and should be updated (how about calling return JFactory::getUser()->authorise('core.edit.state', 'com_contact.category.' . (int) $record->catid); directly ? )
This seems wrong? You're checking there is a valid contact id to delete. We have exactly the same check in all components (e.g. the one in com_content here https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/models/article.php#L159)