fixed/simplified checks for val and rama