Add null check for $ripple