checking contract types
checks for Java ArrayList