Replaced !== with typeof "object", fixes #32