add safty method in caja-util

add safty method in caja-util