Fix: using hasOwnProperty because sometimes you have null values.