Ehrm. #if checks whether a string is empty or not, your ==s will not work here.
The syntax is:
{{#if:whatsoever|non-empty|empty (optional)}}
But what you need is:
{{#ifeq:string1|string2|equal|non-equal (optional)}}
By the way, you may want to create a sub-template for one line of an
infobox and reuse it.
— Kalan