Added gradle build check for unchecked generic method calls and fixed these warnings