Update animationTime to check for null to handle values of 0 correctly