Fix findbugs error (type unboxing and comparison).