extract an if check into a method.
Merge branch '4.0'