Tiny refactoring on checks for integration lock