Fixed NPE in getNullSafeValue caused by null target