Replace call IsNullOrEmpty to IsNullOrWhiteSpace

Additionally to subject some cosmetic changes was made