This is against Lint recommendations. Can you remove the elseif and move it to its own if block?