Only transform if response is defined