Nullpointerexception

Im trying to make my level. And I get this error

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at mygame.Main.loadmodel(Main.java:613)
at mygame.Main.simpleInitApp(Main.java:354)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:662)

This is the void loadmodel:

public void loadmodel(int nr,String model,float x,float y,float z,float scale){
maps2[nr] = assetManager.loadModel(“Models/”+model);
maps2[nr].setLocalScale(scale);
maps2[nr].setLocalTranslation(x, y, z);
maps2[nr].addControl(new RigidBodyControl(0.0f));
CollisionShape shape=CollisionShapeFactory.createMeshShape(maps2[nr]);
//create a collision shape
rigidbodycontrol[nr]=new RigidBodyControl(shape,0);
maps2[nr].addControl(rigidbodycontrol[nr]);
bulletAppState.getPhysicsSpace().add(rigidbodycontrol[nr]);
rootNode.attachChild(maps2[nr]);
}
the error is at this line:
bulletAppState.getPhysicsSpace().add(rigidbodycontrol[nr]);

Sorry found it already my bulletAppState = new BulletAppState(); was below the void call.