Prevent loading image files with null/empty paths
Fix NULL pointer dereference with text lookups