Check for expected attributes before assignment