Fixed if condition with duration property which can be None