Instance/class discrimination

https://github.com/kfgodel/diamond/issues/188