Improve parser if in typeof

If a library global reference is in a typeof or a part of it eg. only
“famous” we would get an error since there is no famous/index.js file
so this dependency cannot be resolved.

This should not matter if used in a typeof context since the user could
simply be testing for the scope.

Try to fix needle ever being undefined - not sure if this ever happens
but I guess it could?