Fixed typeof function check.