type guard function to check if payment is a refund