fix typeof regex