checking type of method calls