Fixed warning about potential type error for a generic