In some cases (ie initial type creation),

the person argument to person_access() is set to a string of 'edit $type_name'
instead of a person argument. In that case grab type substring rather than fail the access check and flood the system with error messages.