Working on type checking for measurement based calculation