Added check for bool type (without it bool properties aren’t serailized.