Can't you just check if both are specified?