Checking for  before calling open() on it