[bugfix] fixed cookieRewrite usage

since properties are only defined when the cookie has values for them,
from the rewrite function is needed to ask for their existence in order
to use its prototyped methods