Some so-called natural lawyers have claimed that the idea of an immoral law is an oxymoron. If some state diktat says that people of a certain race can't travel into certain areas, then that's not a law. That's fine -- but essentially it involves giving a new and special meaning to the word 'law'. Law and morality can be seen as analogous in various ways. They have a similar structure (both involve requirements, permissions, demands, etc.); they serve similar functions (such as coercing people into certain behaviour for social purposes); and they probably have similar origins (see e.g. the work of the anthropologist Christopher Boehm on this). If one sees both law and morality as essentially forms of social coercion, then one is not a branch of the other. In the case of each, we can ask ourselves whether we have a reason to accept it, or parts of it, and whether it can be improved in some way or other.