check to make sure payment_method_or_reference is not a string before trying to get card brand