Added check to verify that hex is actually hex