Multiplies two numbers, handling undefined values