(maint) Fix problem reading empty file with safe yaml

Safe yaml always chokes on an empty file with a TypeError
(nil cannot be converted to an integer).