Check mainTransform for undefined, not false