Added check for class that gets generic param