Could you make this code as an optional code here? so if data.viewId is not available then we just pass null loadContext