simpify isDate() and remove unnecessary semicolon.

- simpify isDate() method.
- remove unnecessary semicolon.