[4.2] Performances : use isset() instead of count comparator

Using `isset` is much faster than using `count` and comparing with a value.
See benchmark https://gist.github.com/lucasmichot/63880030192144960084/894369e9936d30ce06d095fe18800a574ba574b3

count : 8.9168548583984E-5
isset : 2.3126602172852E-5