locker type error check is not working