integrate singularity check in the inverse kinematic