it held that plainly irrational discrimination against aliens is prohibited , but it does not follow that alien race and allegiance may not bear in some instances such a relation to a legitimate object of legislation as to be made the basis of permitted classification , and that it could not state that the legislation is clearly wrong ; and that latitude must be allowed for the legislative appraisement of local conditions and for the legislative choice of methods for controlling an apprehended evil .