Changed output to null instead of string 'null' when no gallery is selected