Ported timestamp validity checks to Java 8 Time API.