Made cookie check explicitly check for a truth value