refactor(Angular): make NaN check in date equality cleaner

Closes #8718