Found bug in javascript's typeof function