add guard clause to check for client side environment
check alertCount property when updating