hanlde exception for NilClass

NoMethodError: undefined method `[]' for nil:NilClass'`

this exception allways raised when id of candidate, party and province not
available