Add null check for /rules and /map