typeof instead of instanceof