performance enhancement by using correct data type for RasterAccessor
(cherry picked from commit 5209595)
check for empty valid expression
(cherry picked from commit 745551e)
performance enhancement by using correct data type
(cherry picked from commit 13ea759)