Check invalid timestamp value

Related to commit 9046bb53