Validate expression and return better errors to user

Change-Id: Ice1775412aa93776d7c07f7851abc1e255aa3edd