Test $date type before setting it as lastModifiedSince