Fix calling getFullYear() of null