Fix type coercion in equality checks

Fixes #41.