removed null check by replacing .toString() with String.valueOf()