Friendly message if name arg is none/false

Closes #18432
Merge pull request #18449 from cachedout/require_name_in_file_state

Friendly message if name arg is none/false