Catch possible typeerror resulting from None being returned when reading the pid.
Remove PIDFileError as it does not always exist in the package and is rarely used.