Fixed NullPointerException on null SQL data