Fixed Badge Add Bug

Replaced in with hasOwnProperty to fix badge adding bug.