determine datatypes in javascript

Determining datatypes in javascript always seemed to be a bit of a mystery, I've seen hundreds of incarnations over the years, some work in some circumstances, until the code starts to get more complex and then just mysteriously stop working, my go to for datatype has always been the following :
This can be extended further through the use of
There have been many a bug created by using