extension should return nil if file has no extension