Postgresql Check If String Is Valid Date