Removed ugly boolean return statement in isPrefix.