Force correct type checking for getCategory method