how do I determine the field type within a field formatter?
Maybe it is better to keep the two formatters separated and just put the shared code into a new formatter. Your two formatters can then extend the new one and just overwride the things specific to them.