object reference not set to instance of object on a static method call - C#