Checking with generics