Typeof is not a function