An address might not have a source code attached at the check time but a contract could be deployed to that address later. In this case, the function would fail by returning False but later turning out to be True. I recommend updating the function from isContract to isContractNow.