So I liked @Ask Clarke answer with little improvement by adding try catch block for dates which cannot go through var d = new Date(d) -
function checkIfDateNotValid(d) {
try{
var d = new Date(d);
return !(d.getTime() === d.getTime()); //NAN is the only type which is not equal to itself.
}catch (e){
return true;
}
}