Added type checking of inner blocks