Fix: IDs that equal to 0 are allowed now.

!value.id becomes true if id=0, therefore using typeof operator makes more sense for checking whether it's defined or not.

note: minified file should be changed as well.