Initialize returned pointer to always trigger NULL checks in callers

Also avoid allocation roundtrip if the file is empty after the BOM