Fix NullPointerException
Support adapter is null