fix possible null pointer when retrieving args