implemented the type check in asignation expression