Tiny bug fix
Properly detect date
Properly detect the type STRING, PRIMITIVE, OBJECT