add checks and test for buffer in value_is