Loose comparison when checking attributes

In normal scenarios it has more sense than strict comparison. It fixes the problem when an integer attribute being assigned the same value, but as a string, is considered dirty.