Scrutinizer recommended type safety fix.