   `fetch_env/2`. Returns `nil` if the application is not loaded.
   """
   @spec spec(app) :: [{key, value}] | nil
-  def spec(app) do
+  def spec(app) when is_atom(app) do
     case :application.get_all_key(app) do
       {:ok, info} -> :lists.keydelete(:env, 1, info)
       :undefined -> nil

  read our [library guidelines](library-guidelines.html).
  """
  @spec get_env(app, key, value) :: value
  def get_env(app, key, default \\ nil) do
    :application.get_env(app, key, default)
  end


  Returns all key-value pairs for `app`.
  """
  @spec get_all_env(app) :: [{key, value}]
  def get_all_env(app) when is_atom(app) do
    :application.get_all_env(app)
  end

