correctly test if attributes is a function