changing relation type names and adding null comparisons