Added condition that destination type must be null or of destination type to pass.