use const reference for object attr in Environment class
fix to check NULL in Environment#addSensor()
fix to check NULL in Agent#addBehavior()