(#19422) Fix error reporting for ParsedFile

Puppet::Error may not have a setter for file, so check if there is
one first (like ExternalFileError has).
(#19422) naginator: Raise a Puppet::ParseError

Raise a Puppet::ParseError instead of a Puppet::Error so we can
set (and report) the file attribute in Puppet::Provider::ParsedFile.
(#19422) Disallow empty values for nagios types

Empty values for nagios type attributes will generate an invalid
config file which naginator will fail to parse again, re-creating
the same invalid config all over again.