added type check in view summary