Made boolean parameters null safe.