Remove redundant check in the code.