typeof 'string' check for packageMains, otherwise 'browserify' default key fails hard.
typeof 'string' check for packageMains, otherwise 'browserify' default key fails hard.

also this matches `enhanced-resolve`'s lookup.

benmosher/eslint-plugin-import,yp/eslint-plugin-import,benmosher/eslint-plugin-import,benmosher/eslint-plugin-import