properly convert js/ruby undefined, nil, null