diff --git a/manifests/gem.pp b/manifests/gem.pp
index 168a3b9..37f5a04 100644
--- a/manifests/gem.pp
+++ b/manifests/gem.pp
@@ -16,8 +16,8 @@
 #
 # A class to manage rubygems proxy settings
 class setproxy::gem (
-  $http_proxy   = undef,
-  $https_proxy  = undef,
+  $http_proxy,
+  $https_proxy,
 ) {
 
   file { '/etc/gemrc':
diff --git a/manifests/git.pp b/manifests/git.pp
index cb0bc34..e1e8be3 100644
--- a/manifests/git.pp
+++ b/manifests/git.pp
@@ -35,6 +35,8 @@ class setproxy::git (
   }
 
   if $enable_gitproxy {
+    validate_string($http_proxy)
+    validate_string($https_proxy)
     file { '/usr/local/bin/gitproxy':
       ensure  => file,
       content => template('setproxy/gitproxy.erb'),