I want to check if the string is a valid date or not.
Date.parse() is not working in this case, because if I pass a string in Date.parse(), it is returning a number.