NEXUS-5993: Fixing a typo

That broke this class. Also, removed unnecessary checks.