Add checking if time is nil