How to test if package is installed

Thanks a lot! However, if I put using OhMyREPL directly in my ~/.julia/config/startup.jl (v0.7/v1.0 replacement of ~/.juliarc.jl), then for normal Julia sessions, I don’t have any problem, but when I try to build Conda.jl, it somehow says that it cannot find OhMyREPL package and suggests that I should run Pkg.add("OhMyREPL") although I already added it.
But then, I found an excellent solution posted by @Simon_Bolland:

After putting this one in startup.jl, I haven’t got any error when building Conda.