fixed elsif body null check