client side check if declarations are legal