Add null check to operation string