Fixed segfault.
Changed == to is where appropriate.