[NODEJS-1767] Make type dectection way better

Fix global grunt